summaryrefslogtreecommitdiffstats
path: root/src/core/hid/input_converter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hid/input_converter.cpp')
-rw-r--r--src/core/hid/input_converter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp
index 502692875..3f7b8c090 100644
--- a/src/core/hid/input_converter.cpp
+++ b/src/core/hid/input_converter.cpp
@@ -304,6 +304,18 @@ Common::Input::NfcStatus TransformToNfc(const Common::Input::CallbackStatus& cal
return nfc;
}
+Common::Input::BodyColorStatus TransformToColor(const Common::Input::CallbackStatus& callback) {
+ switch (callback.type) {
+ case Common::Input::InputType::Color:
+ return callback.color_status;
+ break;
+ default:
+ LOG_ERROR(Input, "Conversion from type {} to color not implemented", callback.type);
+ return {};
+ break;
+ }
+}
+
void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value) {
const auto& properties = analog.properties;
float& raw_value = analog.raw_value;